package com.motong.gongdan.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.motong.gongdan.vo.system.otherVo.CustomFieldVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 装配工单-工单关系表
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "装配工单-工单关系表")
@Data
@Accessors(chain = true)
@TableName(value = "assembly_work_order_detail")
public class AssemblyWorkOrderDetail extends PublicPo implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "")
    private Long id;

    /**
     * 装配工单id(assembly_work_order表id)
     */
    @TableField(value = "assembly_work_order_id")
    @ApiModelProperty(value = "装配工单id(assembly_work_order表id)")
    private Long assemblyWorkOrderId;

    /**
     * 工单id(work_order表id)
     */
    @TableField(value = "worker_order_id")
    @ApiModelProperty(value = "工单id(work_order表id)")
    private Integer workerOrderId;

    /**
     * 工单编码
     */
    @TableField(value = "worker_order_code")
    @ApiModelProperty(value = "工单编码")
    private String workerOrderCode;

    /**
     * 单位产品用量
     */
    @TableField(value = "unit_usage")
    @ApiModelProperty(value = "单位产品用量")
    private BigDecimal unitUsage;


    /**
     * 数量
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "数量")
    private BigDecimal workOrderPlanNum;

    /**
     * 计划开始时间
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "计划开始时间")
    private Date planStartTime;

    /**
     * 计划结束时间
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "计划结束时间")
    private Date planEndTime;

    /**
     * 工单自定义字段
     */
    @TableField(exist = false)
    @ApiModelProperty("工单自定义字段")
    private List<CustomFieldVo> customFieldVos;


    /**
     * 备注
     */
    @TableField(value = "remark")
    @ApiModelProperty(value = "备注")
    private String remark;

    /**
     * 层级
     */
    @TableField(value = "level")
    @ApiModelProperty(value = "层级")
    private String level;

    @TableField(value = "parent_level")
    @ApiModelProperty(value = "父层级")
    private String parentLevel;



    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 创建人(user表id)
     */
    @TableField(value = "create_user")
    @ApiModelProperty(value = "创建人(user表id)")
    private Integer createUser;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    /**
     * 更新人(user表id)
     */
    @TableField(value = "update_user")
    @ApiModelProperty(value = "更新人(user表id)")
    private Integer updateUser;


    /**
     * 产品id
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "产品id")
    private Integer productId;

    private static final long serialVersionUID = 1L;
}